package com.budwk.app.sqfw.enums;

import lombok.Getter;

/**
 * 云潭街道excel表格类型
 */
@Getter
public enum YunTanExcelType {

    RISK_HIDDEN_INSPECTION(1, "风险、隐患排查整治台账"),
    FIRE_SAFETY_INSPECTION(2, "消防安全巡查台账"),
    SAFE_PRODUCT_INSPECTION(3, "安全生产检查台账"),
    GAS_SAFETY_MANAGE_SUPERVISE(4, "燃气安全管理督导检查表"),
    NINE_SMALL_ILLEGAL_RESIDENTS(5, "九小场所违规住人整改台账"),
    ARREARS_RIS_INSPECTION(6, "欠薪风险排查工作表"),
    NINE_HIDDEN(8, "“九小场所”隐患排查统计表");

    private final Integer code;
    private final String name;

    YunTanExcelType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 通过code获取登录客户端类型
     *
     * @param code
     * @return
     */
    public static String getName(Integer code) {
        for (YunTanExcelType o : YunTanExcelType.values()) {
            if (o.getCode() == code) {
                return o.getName();
            }
        }
        return null;
    }
}
